<?php
/**
 * @author Jhonatan S. Serafim
 * @since 04/07/2011
 * @since 03/09/2011
 */
abstract class SGObjetoManager extends SGObjeto {
	
	protected $conn;
	
	const 
	INSERIR = 1,
	ATUALIZAR = 2,
	DELETAR = 3,
	SELECIONAR = 4,
	LISTAR = 5,
	CONTAR = 6;
	
	public function __construct(SGObjetoConexao $conn){
		$this->conn =& $conn;
	}
	
	public function inserir(SGObjeto $obj){}
	
	public function atualizar(SGObjeto $obj){}
	
	public function deletar(SGObjeto $obj){}
	
	public function selecionar(SGObjeto $obj){}
	
	public function listar(SGObjeto $obj){}
	
	public function contar(SGObjeto $obj){}
	
	public function queryOne($sql){}
	
	public function execute($sql){}
	
	public function beginTransaction(){
		$this->conn->beginTransaction();
	}
	
	public function commit(){
		$this->conn->commit();
	}
	
	public function rollback(){
		$this->conn->rollback();
	}
	
}
?>